<!DOCTYPE html>
<html>
<head>
    <title>确认订单付款</title>
    <#include "/header.html">
</head>

<style>
    a:link,a:visited{
        text-decoration:none;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <!-- 查询 start -->
            <form class="form-inline" role="form">
                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                <a class="btn btn-danger btn-sm"  @click="batchConfrim">批量确认</a>
                <a class="btn btn-danger btn-sm"  @click="updateDialogFormBatch">批量修改</a>

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.orderNo" @keyup.enter="query" placeholder="ERP单号">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.memberName" @keyup.enter="query" placeholder="会员名">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <el-select v-model="q.receiveStatus" placeholder="是否录入收款" @keyup.enter="query" size="small" style="width: 130px">
                        <el-option value="">全部</el-option>
                        <el-option label="已录入" value="1"></el-option>
                        <el-option label="未录入" value="0"></el-option>
                    </el-select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <el-select v-model="q.costRecord" placeholder="是否计入成本统计" @keyup.enter="query" size="small" style="width: 130px">
                        <el-option value="">全部</el-option>
                        <el-option label="是" value="1"></el-option>
                        <el-option label="否" value="0"></el-option>
                    </el-select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.payment">
                        <option disabled value="">支付方式</option>
                        <option value="">全部</option>
                        <option v-for="item in paymentEnum" :value="item.value">{{item.describe}}</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <el-select v-model="q.payed" placeholder="是否支付" size="small" style="width: 130px">
                        <el-option value="">全部</el-option>
                        <el-option label="已支付" value="1"></el-option>
                        <el-option label="未支付" value="0"></el-option>
                    </el-select>
                </div>&nbsp;&nbsp;&nbsp;
                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>
            <!-- 查询 end -->
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!-- 付款弹框 -->
    <el-dialog title="确认收款信息" :visible.sync="dialogFormVisible" width="420px">
        <el-form :model="form">
            <el-form-item label="收款金额" label-width="80px" v-if="!form.isBatch">
                <el-input-number v-model="form.receiveMoney" :precision="2" :step="1" :max="100000" size="medium"></el-input-number>
            </el-form-item>
            <el-form-item label="收款日期" label-width="80px">
                <el-date-picker  v-model="form.receiveMoneyDate"  type="date"  placeholder="选择日期" format="yyyy 年 MM 月 dd 日" style="width: 300px;"></el-date-picker>
            </el-form-item>
            <el-form-item label="收款备注" label-width="80px">
                <el-input v-model="form.receiveMoneyRemark" type="textarea" maxlength="500" :autosize="{ minRows: 2, maxRows: 6}" placeholder="请输入备注信息，500字以内"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="receiveConfrim" size="mini">确 定</el-button>
            <el-button @click="dialogFormVisible = false" size="mini">取 消</el-button>
        </div>
    </el-dialog>

    <!-- 修改收款信息弹框 -->
    <el-dialog title="修改收款信息" :visible.sync="updateDialogFormVisible" width="420px">
        <el-form :model="form">
            <el-form-item label="收款金额" label-width="80px" v-if="!form.isBatch">
                <el-input-number v-model="form.receiveMoney" :precision="2" :step="1" :max="100000" size="medium" disabled></el-input-number>
            </el-form-item>
            <el-form-item label="收款日期" label-width="80px">
                <el-date-picker  v-model="form.receiveMoneyDate"  type="date"  placeholder="选择日期" format="yyyy 年 MM 月 dd 日" style="width: 300px;"></el-date-picker>
            </el-form-item>
            <el-form-item label="收款备注" label-width="80px">
                <el-input v-model="form.receiveMoneyRemark" type="textarea" maxlength="500" :autosize="{ minRows: 2, maxRows: 6}" placeholder="请输入备注信息，500字以内"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="updateDialogFormVisibleHandler" size="mini">确 定</el-button>
            <el-button @click="updateDialogFormVisible = false" size="mini">取 消</el-button>
        </div>
    </el-dialog>

    <!-- 备注弹框 -->
    <el-dialog title="备注信息" :visible.sync="dialogFormVisibleRemark" width="420px">
        <el-form :model="formRemark">
            <el-form-item label="订单号: " label-width="80px">
                {{formRemark.orderNo}}
            </el-form-item>
            <el-form-item label="收款备注: " label-width="80px">
                <el-input v-model="formRemark.receiveMoneyRemark" type="textarea" maxlength="500" :autosize="{ minRows: 2, maxRows: 6}" placeholder="请输入备注信息，500字以内"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="receiveRemark" size="mini">确 定</el-button>
            <el-button @click="dialogFormVisibleRemark = false" size="mini">取 消</el-button>
        </div>
    </el-dialog>

    <!-- 是否计入成本 -->
    <el-dialog title="成本" :visible.sync="costRecordFormVisible" width="450px">
        <el-form :model="formOrderRecord">
            <el-form-item label="订单号: " label-width="120px">
                {{formOrderRecord.orderNo}}
            </el-form-item>
            <el-form-item label="计入成本统计: " label-width="120px">
                <el-select v-model="formOrderRecord.costRecord" placeholder="请选择">
                    <el-option  label="是" value="1"></el-option>
                    <el-option  label="否" value="0"></el-option>
                </el-select>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="costRecordConfirm" size="mini">确 定</el-button>
            <el-button @click="costRecordFormVisible = false" size="mini">取 消</el-button>
        </div>
    </el-dialog>
</div>

<script src="${request.contextPath}/statics/js/modules/finance/orderConfirmPay.js?_${.now?long}"></script>
</body>
</html>